#ifndef WORDQUERY_H
#define WORDQUERY_H
#include<iostream>
#include "Query_base.h"
class TextQuery;
class QueryResult;
class WordQuery : public Query_base {
    friend class Query;     // Query使用WordQuery构造函数
    WordQuery(const std::string &s): query_word(s) { }
    // 具体的类: WordQuery 将定义所有继承而来的纯虚函数
    QueryResult eval(const TextQuery &) const override;
    std::string rep() const override{ return query_word; }   
    std::string query_word;  
};

#endif